import random


class MineShuffle:
    def __init__(self, s_list):
        self.shuffle_list = s_list
        self.result_list = []

    def swap(self, a, b):
        t = self.shuffle_list[a]
        self.shuffle_list[a] = self.shuffle_list[b]
        self.shuffle_list[b] = t

    def shuffle(self):
        l = len(self.shuffle_list)

        for i in range(l - 1):
            swap_i = random.randint(i + 1, l - 1)
            self.swap(i, swap_i)

        return self.shuffle_list

    def getShuffle(self, n=0):
        if n == 0:
            return self.shuffle_list

        self.result_list = self.shuffle_list[0:n]
        return self.result_list
